/**
 * Description:
 * Class Name:InnerNoStatic
 * Date:2022/2/9 14:13
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第6章_面向对象_下._6_7_内部类.非静态内部类;

public class InnerNoStatic {
    private class InnerClass{
        // 下面三个静态声明都将不引发错误，但是不符合规范
        static {
            System.out.println("===============");
            inProp = 5;
        }
        public InnerClass(){}
        private static int inProp;
        private static void test(){}

        public void pp(){
            System.out.println(inProp);
        }
    }

    public void getpp(){
        var xx = new InnerClass();
        xx.pp();
    }

    public static void main(String[] args) {
        new InnerNoStatic().getpp();
    }
}
